class Solution
{
public:
    int singleNumber(vector<int>& nums)
    {
        int value = 0;
        for (auto n : nums)
        {
            value ^= n;
        }
        return value;
    }
};